package interfaz;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;


public class NivelAlto extends JFrame {
	
	private static final long serialVersionUID = 1L;
	private JPanel mainPanel;
	private JButton atrasButton;
	private Container buttonsPanel;
	private JButton resetearButton;
	private JButton comprobarButton;
	private JButton vistaButton;
	private JButton solucionButton;
	private JButton informacionButton;
	private JButton ayudaButton;
	private JButton guardarButton;
	
	public static void main(String[] args) {
		new NivelBajo().setVisible(true);
	}
	public NivelAlto(){
		inicializaComponentes();
		pack();
		
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension frameSize = getSize();
        setLocation(new Point((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.width) / 2));
	}
	
	
	
	public void inicializaComponentes(){
		GridBagConstraints gridBagConstraints;
		
		
		mainPanel = new JPanel();
		atrasButton = new JButton();
		buttonsPanel = new JPanel();
		resetearButton = new JButton();
		comprobarButton = new JButton();
		vistaButton = new JButton();
		solucionButton = new JButton();
		informacionButton = new JButton();
		ayudaButton = new JButton();
		guardarButton = new JButton();
		
		
		setTitle("Link-A-Pix");
		
   		mainPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
	    mainPanel.setMinimumSize(new Dimension(297, 200));
	    mainPanel.setLayout(new GridBagLayout());
	    
	    
	    resetearButton.setMnemonic('E');
	    resetearButton.setText("Empezar");
	    resetearButton.setToolTipText("Empezar de nuevo");
	    resetearButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				resetearButtonActionPerformed(evt);
			}
		});
	    
	    gridBagConstraints = new GridBagConstraints();
	    gridBagConstraints.gridwidth = GridBagConstraints.NORTHWEST;
	    gridBagConstraints.gridheight = GridBagConstraints.REMAINDER;
	    gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
    	gridBagConstraints.weighty = 1.0;
    	mainPanel.add(resetearButton, gridBagConstraints);
	
	
    	comprobarButton.setMnemonic('C');
    	comprobarButton.setText("Comprobar");
    	comprobarButton.setToolTipText("Check");
    	comprobarButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				comprobarButtonActionPerformed(evt);
			}
		});
	    
	    gridBagConstraints = new GridBagConstraints();
	    gridBagConstraints.gridwidth = GridBagConstraints.NORTHWEST;
	    gridBagConstraints.gridheight = GridBagConstraints.REMAINDER;
	    gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
    	gridBagConstraints.weighty = 1.0;
    	mainPanel.add(comprobarButton, gridBagConstraints);
	
	
    	
    	vistaButton.setMnemonic('V');
    	vistaButton.setText("Vista");
    	vistaButton.setToolTipText("Vista previa");
    	vistaButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				vistaButtonActionPerformed(evt);
			}
		});
	    
	    gridBagConstraints = new GridBagConstraints();
	    gridBagConstraints.gridwidth = GridBagConstraints.NORTHWEST;
	    gridBagConstraints.gridheight = GridBagConstraints.REMAINDER;
	    gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
    	gridBagConstraints.weighty = 1.0;
    	mainPanel.add(vistaButton, gridBagConstraints);
	
	
    	
    	solucionButton.setMnemonic('V');
    	solucionButton.setText("Vista");
    	solucionButton.setToolTipText("Vista previa");
    	solucionButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				solucionButtonActionPerformed(evt);
			}
		});
	    
	    gridBagConstraints = new GridBagConstraints();
	    gridBagConstraints.gridwidth = GridBagConstraints.NORTHWEST;
	    gridBagConstraints.gridheight = GridBagConstraints.REMAINDER;
	    gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
    	gridBagConstraints.weighty = 1.0;
    	mainPanel.add(solucionButton, gridBagConstraints);
	
	
    	
    	
    	informacionButton.setMnemonic('V');
    	informacionButton.setText("Vista");
    	informacionButton.setToolTipText("Vista previa");
    	informacionButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				informacionButtonActionPerformed(evt);
			}
		});
	    
	    gridBagConstraints = new GridBagConstraints();
	    gridBagConstraints.gridwidth = GridBagConstraints.NORTHWEST;
	    gridBagConstraints.gridheight = GridBagConstraints.REMAINDER;
	    gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
    	gridBagConstraints.weighty = 1.0;
    	mainPanel.add(informacionButton, gridBagConstraints);
	
    	
	    atrasButton.setMnemonic('N');
	    atrasButton.setText("Volver");
	    atrasButton.setToolTipText("Volver");
	    atrasButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            atrasButtonActionPerformed(evt);
        }
    });
	    gridBagConstraints = new GridBagConstraints();
	    gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER;
	    gridBagConstraints.gridheight = GridBagConstraints.REMAINDER;
	    gridBagConstraints.anchor = GridBagConstraints.SOUTHEAST;
    	gridBagConstraints.weighty = 1.0;
    	mainPanel.add(atrasButton, gridBagConstraints);
    	
	
	
    	

    	getContentPane().add(mainPanel, BorderLayout.CENTER);
		
		

	
	
	}
		protected void atrasButtonActionPerformed(ActionEvent evt) {
			this.setVisible(false);
			new Niveles().setVisible(true);
		}

		protected void resetearButtonActionPerformed(ActionEvent evt) {
			
		}
		
		protected void comprobarButtonActionPerformed(ActionEvent evt) {
			
		}
		
		protected void vistaButtonActionPerformed(ActionEvent evt) {
			
		}
		
		protected void solucionButtonActionPerformed(ActionEvent evt) {
			
		}
		
		protected void informacionButtonActionPerformed(ActionEvent evt) {
			
		}
}

